package com.example.zhyq.sign

import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.base.entity.VisitStatusBean
import com.example.zhyq.R

class SignStatusAdapter : BaseQuickAdapter<VisitStatusBean, BaseViewHolder>(R.layout.item_visitstatus) {
    override fun convert(helper: BaseViewHolder, item: VisitStatusBean) {
        val tv_status = helper.getView<TextView>(R.id.vis_status)

        tv_status.setText(item.status)

        if (item.isCheck) {
            tv_status.setBackgroundResource(R.drawable.shape_solid_darkgreen)
        }else {
            tv_status.setBackgroundResource(R.drawable.shape_solid_lightgray)
        }
    }
}